import request from '@/service'

export const getUserList = params => {
  return request({
    method: 'Get',
    url: 'users',
    params
  })
}

// 获取商品分类数据列表
export const getGoodsList = params => {
  return request({
    method: 'Get',
    url: 'categories',
    params
  })
}

// 获取商品分类数据列表
export const toObtainList = (id, params) => {
  return request({
    method: 'Get',
    url: `categories/${id}/attributes`,
    params: {
      sel: params
    }
  })
}

// 获取商品分类数据列表
export const addGoods = data => {
  return request({
    method: 'post',
    url: 'goods',
    data
  })
}
